<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>高度塌陷</title>
    <style>
        /*.d1:after {
            content: "";
            display: block;
            clear: both;
        }*/

        .d1 > div{
            float: left;
            width: 200px;
            height: 200px;
        }

        .item1 {
            background: #2D64FA;
        }
        .item2 {
            background: darkgoldenrod;
        }
    </style>
</head>
<body>
    <div class="d1">
        <div class="item1">1</div>
        <div class="item2">1</div>
    </div>
</body>
</html>
